import request from '@/utils/request'

export default {
  //保存课程基本信息
  saveCourseInfo(course) {
    return request({
      url: `/eduservice/course/addCourseInfo`,
      method: 'post',
      data: course
    })
  },

  //获取所有讲师
  getTeacherList() {
    return request({
      url: `/eduservice/teacher/list`,
      method: 'get'
    })
  },
  //获取课程信息
  getCourseInfo(courseId) {
    return request({
      url: `/eduservice/course/getCourseInfo/${courseId}`,
      method: 'get'
    })
  },
  //修改课程基本信息
  updateCourseInfo(course) {
    return request({
      url: `/eduservice/course/updateCourseInfo`,
      method: 'post',
      data: course
    })
  },
  //获取课程信息
  getPublishCourseInfo(courseId) {
    return request({
      url: `/eduservice/course/getPublishCourseInfo/${courseId}`,
      method: 'get'
    })
  },
  //课程发布
  PublishCourse(courseId) {
    return request({
      url: `/eduservice/course/publishCourse/${courseId}`,
      method: 'post'
    })
  },
  //课程列表
  getCourseList(page,size) {
    return request({
      url: `/eduservice/course/courseList/${page}/${size}`,
      method: 'get'
    })
  },
}
